package com.dqp.cslggroup.JWXT;

import org.jsoup.Connection;
import org.jsoup.Jsoup;

import java.io.IOException;


public class GetSchoolCalendar {
    private Connection.Response response;

    public byte[] getCalendar1() throws IOException {
        response = Jsoup.connect("https://info.cslg.edu.cn/__local/8/85/E0/6D9AFEAEF9ECCFEBC0CBD699393_87234181_BE59.png")
                .ignoreContentType(true) // 获取图片需设置忽略内容类型
                .userAgent("Mozilla")
                .header("Authorization", "Basic MDkyNjE3MTAzOjA5MjYxNzEwMw==")
                .method(Connection.Method.GET)
                .timeout(5000)
                .execute();
        return response.bodyAsBytes();
    }

    public byte[] getCalendar2() throws IOException {
        response = Jsoup.connect("https://info.cslg.edu.cn/__local/6/96/18/78AD8027EDF523B63D55B46A62B_4D53CF2E_BCC8.png")
                .ignoreContentType(true) // 获取图片需设置忽略内容类型
                .header("Authorization", "Basic MDkyNjE3MTAzOjA5MjYxNzEwMw==")
                .userAgent("Mozilla")
                .method(Connection.Method.GET)
                .timeout(5000)
                .execute();
        return response.bodyAsBytes();
    }
}
